package com.oracle.action;

import com.oracle.model.User;
import com.oracle.service.UserService;

public class UserAction extends SupperAction {
	private static final long serialVersionUID = 1L;
	private UserService userService;
	private User user;
	
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public UserService getUserService() {
		return userService;
	}
	public void setUserService(UserService userService) {
		this.userService = userService;
	}
	
	/**
	 * 
	 */
	public String registerUser(){
		this.userService.addUser(user);
		return SUCCESS;
	}
	public String showUser(){
		User u = this.userService.showUser(1);
		this.setUser(u);
		return "show";
	}
	
	
	
}
